import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const actions={}
const getters={}
const state={
    username:localStorage.getItem('username')
}
const mutations={
    setUsername:(state,username)=>{
        state.username=username
        localStorage.setItem('username', username)
    }
}
export default new Vuex.Store({
    state,
    getters,
    actions,
    mutations
})